package com.flyou.consumer.controller;


import com.flyou.consumer.client.UserFeginClient;
import com.flyou.consumer.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/fegin")
public class FeginController {
    @Autowired
    UserFeginClient userFeginClient;

    @GetMapping("/user/{id}")
    public User getUserById(@PathVariable("id") Long id) {
        return userFeginClient.findUserById(id);
    }
}
